<template>
	<view>
		<view class="newest-item" v-for="(item, index) in hotComments" :key="index">
			<view class="newest-item-info">
				<view class="newest-item-info-left">
					<u-avatar :src="item.user.avatarUrl" size="50"></u-avatar>
					<view class="newest-item-info-left-name">
						<u--text :text="item.user.nickname" size="18px"></u--text>
						<u--text :text="item.time" size="12px" mode="date" color="#ccc"></u--text>
					</view>
				</view>
				<view class="newest-item-info-right">
					<u--text :text="item.likedCount" size="16px"></u--text>
					<u-icon name="thumb-up" size="28px"></u-icon>
				</view>
			</view>
			<view class="newest-item-content">
				<u--text :text="item.content" size="16px"></u--text>
			</view>
		</view>

		<u-divider text="到底啦"></u-divider>
	</view>
</template>

<script>
export default {
	props: {
		hotComments: {
			type: Array,
			default() {
				return [];
			}
		}
	}
};
</script>

<style lang="scss" scoped>
.newest-item {
	display: flex;
	flex-direction: column;

	&-content {
		display: flex;
		width: 80%;
		justify-content: center;
		padding: 10rpx 15rpx 30rpx 110rpx;
	}

	&-info {
		display: flex;
		justify-content: space-between;
		align-items: center;

		&-left {
			display: flex;
			align-items: center;

			&-name {
				display: flex;
				flex-direction: column;
				justify-content: center;
				margin-left: 15rpx;
			}
		}

		&-right {
			display: flex;
		}
	}
}
</style>